package com.yiwei.zhh.constant;

/**
 * 定义常量
 * Created by Master.Dong on 2016/4/5 0005.
 */
public class Const {

    //    public static final String SERVER_API_URL = "http://app.api.zhh.zhixinpai.cn";
    public static final String SERVER_API_URL = "http://app.api.zhh.emjz.cn";
    //        public static final String SERVER_API_URL = "http://test.app.api.zhh.zhixinpai.cn";
    public static final boolean IS_DEBUG = false;

    public static final String SP_NAME = "rabi_sp";
    public static final String LIMU_CALLBACK = SERVER_API_URL + "/callback/limu";

    public static final boolean RELEASE = true;  //是否关闭Log
    public static final String APP_NAME = "dob.apk";  //更新下载的apk名称
    public static final long VERSION_UPDATE_TIME = 30 * 60 * 1000;  //检查版本更新时间 30分钟
    public static final long PAGE_UPDATE_TIME = 60 * 60 * 1000;  //检查引导页更新时间  1小时

    public static final int DEFAULT_TIMEOUT = 60 * 1000;  //缺省网络超时时间
    public static final String GESTURE_PASSWORD = "ZHH_GesturePassword";
    public static final String DEFAULT_KEY = "FANWE5LMUQC43P2P";

    public static final String SERVICE_PHONE = "13827260730";//客服电话
    public static final String BUSINESS_PHONE = "13827260730";//业务电话
    public static final String SERVICE_EMAIL = "service@dob500.com";//邮箱地址
    public static final String SERVICE_TIME = "9:30-18:30";//服务时间


    public static final String ALIPAY_PAY_API = "http://pay.api.rabibird.com/alipaywap/";  //支付宝api
    public static final String YIJI_PAY_API = "https://openapi.yijifu.net/gateway";  //易极付api

    public static final String ZHI_MA_SCHEMA = "zhh://test.pay.api.dob500.com/antopen/certreturn";

    public static final String DOWNLOAD_URL = "http://www.dob500.cn/index.php/index/download?filename=com.yiwei.zhh.apk";

    public static final String WECHAT_REPAY_URL = SERVER_API_URL + "/views/weixin-repayment";


    /**
     * 请求数据API
     */
//    public static final String APP_INIT = SERVER_API_URL + "/appinit";  //APP 初始化接口
//    public static final String ABOUTUS = SERVER_API_URL + "/article/index/aboutus";  //关于我们
//    public static final String LOGIN = SERVER_API_URL + "/login";  //登录
//    public static final String REGISTER = SERVER_API_URL + "/register";  //注册
//    public static final String LOGOUT = SERVER_API_URL + "/logout";  //退出登录
//    public static final String REGISTER_CODE = SERVER_API_URL + "/verifycode/registercode?";  //注册验证码
//    public static final String CONTACT_US = SERVER_API_URL + "/article/index/contactus";  //注册验证码
//    public static final String UPDATE_NICKNAME = SERVER_API_URL + "/user/updatenickname"; //修改昵称
//    public static final String HELP = SERVER_API_URL + "/article/sos"; //SOS
//    public static final String HELP_DETAIL = SERVER_API_URL + "/article/index/"; //SOS详情
//    public static final String MESSAGE = SERVER_API_URL + "/usermsg"; //消息中心
//    public static final String MESSAGE_DETAIL = SERVER_API_URL + "/usermsg/detail"; //消息中心详情
//    public static final String BANNER = SERVER_API_URL + "/ads/index"; //消息中心详情

//    public static final String SUGGESTION = SERVER_API_URL + "/suggestion";//建议与意见
//    public static final String SUGGESTION_TYPE = SERVER_API_URL + "/suggestion/typelist";//建议与意见类型
    public static final String UPLOAD_IMAGE = SERVER_API_URL + "/upload";//图片上传
    public static final String DEALTYPE = SERVER_API_URL + "/dealtypes";//贷款类型
    public static final String USER = SERVER_API_URL + "/user"; //用户中心
    public static final String CHECK_USER_PASSWORD = SERVER_API_URL + "/user/checkpassword"; //用户中心检查原密码
    public static final String UPDATE_PASSWORD = SERVER_API_URL + "/user/updatepassword"; //用户中心设置密码

    public static final String UPDATE_PWD_CODE = SERVER_API_URL + "/verifycode/sendcode";  //修改密码验证码
    public static final String CHECK_UPDATE_PWD_CODE = SERVER_API_URL + "/verifycode/checkcode";  //检查修改密码验证码
    public static final String RESET_PASSWORD = SERVER_API_URL + "/user/resetpassword";  //重置密码

    public static final String MONEY_LOG = SERVER_API_URL + "/user/moneylog"; //交易明细
    public static final String CAPTCHA = SERVER_API_URL + "/xuexin/captcha"; //学信网获取验证码
    public static final String CAPTCHA2 = SERVER_API_URL + "/xuexin/captcha2"; //学信网获取验证码
    public static final String XUE_XIN = SERVER_API_URL + "/xuexin"; //学信网数据
    public static final String XUE_XIN_ACCOUNT = SERVER_API_URL + "/xuexin/account"; //学信网账号


    public static final String RETRIEVE_PWD = SERVER_API_URL + "/xuexin/retrievepassword"; //学信网找回密码
    public static final String RETRIEVE_BY_EMAIL = SERVER_API_URL + "/xuexin/retrievebyemail"; //邮箱找回密码
    public static final String RETRIEVE_BY_PHONE = SERVER_API_URL + "/xuexin/retrievebymobile"; //邮箱找回密码
    public static final String RESET_PWD_BY_PHONE = SERVER_API_URL + "/xuexin/resetpasswordbymobile"; //重置密码


    public static final String IDCARD = SERVER_API_URL + "/upload/idcard/"; //身份证
    public static final String IDCARD_AUTH = SERVER_API_URL + "/user/idcard"; //已认证身份证信息

    public static final String BANKCARD = SERVER_API_URL + "/bankcard"; //验证银行卡
    public static final String BANK_CARDNO = SERVER_API_URL + "/bankcard/cardno"; //卡号获取信息
    public static final String BANK_CODE = SERVER_API_URL + "/bankcard/verifycode"; //银行验证码

    public static final String DEAL_LIST = SERVER_API_URL + "/deal/deallist"; //借款记录
    public static final String REPAY_INGDEAL = SERVER_API_URL + "/deal/repayingdeal"; //还款页

    public static final String ADD_RESSLIST = SERVER_API_URL + "/addresslist"; //通讯录

    public static final String PHONE = SERVER_API_URL + "/phone"; //采集通话记录
    public static final String PHONE_CALL_RECORD = SERVER_API_URL + "/phone/callrecord"; //采集通话记录
    public static final String PHONE_SENDCODE = SERVER_API_URL + "/phone/sendcode"; //采集通话记录验证码

    public static final String GOAPPLY = SERVER_API_URL + "/deal/goapply"; //是否允许取现
    public static final String UPLOAD_PHOTO = SERVER_API_URL + "/upload/photo";//颜值照片上传

    public static final String CONTRACT = SERVER_API_URL + "/contract";//各种协议

    public static final String BEGIN_APPLY = SERVER_API_URL + "/deal/beginapply";//开始申请贷款
    public static final String NEW_BEGIN_APPLY = SERVER_API_URL + "/deal/beginapply2";//开始申请贷款
    public static final String SUBMIT_APPLY = SERVER_API_URL + "/deal/submitapply";//正式提交贷款申请
    public static final String LIMU_API_KEY = SERVER_API_URL + "/limu/account";//获取立木 ApiKey
    public static final String LIMU_SIGN = SERVER_API_URL + "/limu/sign";//获取立木 sign
    public static final String LIMU_TOKEN = SERVER_API_URL + "/limu/token";//获取立木 token

    public static final String REALNAME = SERVER_API_URL + "/bankcard/realname";//获取用户姓名
    public static final String BANK_SAVE = SERVER_API_URL + "/bankcard/save";//提交银行卡
    public static final String AUTH = SERVER_API_URL + "/bankcard/auth";//银行卡鉴权
    public static final String BANK_LIST = SERVER_API_URL + "/bankcard/banklist"; //银行卡列表

    public static final String LOAN_DETAIL = SERVER_API_URL + "/deal/detail";//借款结果详情

    public static final String NORMAL_REPAY = SERVER_API_URL + "/repay/normalrepay"; //余额还款
    public static final String GO_PAY = SERVER_API_URL + "/gopay"; //支付选择页面
    public static final String GO_PAY_OFFLINE_PAYMENT = SERVER_API_URL + "/gopay/offlinepayment"; //线下支付
    public static final String OFFLINE = SERVER_API_URL + "/repay/offline"; //提交线下支付

    public static final String OFFLINE_NEW_ORDER = SERVER_API_URL + "/paymentnotice/order"; //线下支付新增订单
    public static final String ALIPAY_PARAMS = SERVER_API_URL + "/payment/alipayparams"; //支付宝app支付
    public static final String YIJIPAY_PARAMS = SERVER_API_URL + "/payment/yijifuparams";  //易极付

    public static final String SUBMIT_IDCARD = SERVER_API_URL + "/upload/submitidcard"; //上传身份证

    public static final String JI_GUANG = SERVER_API_URL + "/jiguang"; //极光推送

    public static final String ZHI_MA_AUTH = SERVER_API_URL + "/zhima/authinfoauthorize"; //芝麻积分
    public static final String ZHI_MA_VALIDATE = SERVER_API_URL + "/zhima/validate"; //上传芝麻积分
    public static final String ZHI_MA_CERT = SERVER_API_URL + "/zhima/cert"; //获取芝麻认证url和biz_no
    public static final String ZHI_MA_CERTQUERY = SERVER_API_URL + "/zhima/certquery"; //芝麻认证结果查询

    public static final String APPLY = SERVER_API_URL + "/usercarry/apply"; //提现申请
    public static final String DEAL_DETAIL = SERVER_API_URL + "/deal/dealdetail"; //借款详情

    public static final String APPLY_STATUS = SERVER_API_URL + "/deal/applystatus"; //申请进度

    public static final String FORGET_PHONE_PWD = SERVER_API_URL + "/phone/forget"; //忘记服务密码

    public static final String MODIFY_PHONE_SEND_CODE = SERVER_API_URL + "/modifyphone/sendcode"; //更改手机 获取验证码
    public static final String MODIFY_PHONE_CHECK_CODE = SERVER_API_URL + "/modifyphone/checkcode"; //更改手机 验证原手机号
    public static final String MODIFY_PHONE = SERVER_API_URL + "/modifyphone/modifyphone"; //更改手机 设置新号码
    public static final String MODIFY_PHONE_CHECK_IDCARD = SERVER_API_URL + "/modifyphone/checkidcard"; //更改手机 身份证验证
    public static final String MODIFY_PHONE_CHECK_XUEXIN = SERVER_API_URL + "/modifyphone/checkxuexin"; //更改手机 学信网验证
    public static final String MODIFY_PHONE_CHECK_OLD_PHONE = SERVER_API_URL + "/modifyphone/checkoldphone"; //更改手机 验证手机号
    public static final String MODIFY_PHONE_CHECK_OLD_IDCARD = SERVER_API_URL + "/modifyphone/checkoldidcard"; //更改手机 验证身份证

    public static final String REPAY_INVITE = SERVER_API_URL + "/dealinviterepay/invite";  //通知TA（找TA还）
    public static final String REPAY_RECORD_LIST = SERVER_API_URL + "/paymentnotice/lists";  //还款记录
    public static final String RELATIVES_URL = SERVER_API_URL + "/relatives/add";


    //--------- 学信网注册  ------------//
    public static final String CHSI_URL = "https://account.chsi.com.cn";
    public static final String CHSI_CHECK_MOBILE = CHSI_URL + "/account/checkmobilephoneother.action"; //检查手机号
    public static final String CHSI_CAPTCH_IMAGE = CHSI_URL + "/account/captchimagecreateaction.action"; //图片验证码
    public static final String CHSI_SMS_CODE = CHSI_URL + "/account/getmphonpincode.action"; //验证码
    public static final String CHSI_REGISTER = CHSI_URL + "/account/registerprocess.action"; //注册

    public static final String ALIPAY_START = "alipays://platformapi/startapp?saId=10000007&clientVersion=3.7.0.0718&qrcode=";
    public static final String ALIPAY_END = "%3F_s%3Dweb-other";


    public static final String ACT_SPREAD = SERVER_API_URL + "/views/strategy"; //推广攻略
    public static final String ACT_RULES = SERVER_API_URL + "/views/prize-rules"; //申请进度

    /**
     * 请求类型
     */
    public static final class RequestMethod {
        public static final int GET = 0;
        public static final int POST = 1;
        public static final int LOAD = 2;
    }

    /**
     * 请求数据类型
     */
    public static final class RequestDataType {
        public static final int BASE64 = 0;
        public static final int REQUEST = 1;
        public static final int AES = 4;
    }

    /**
     * 返回数据类型
     */
    public static final class ResponseDataType {
        public static final int BASE64 = 0;
        public static final int JSON = 1;
        //public static final int ARRAY = 2;
        public static final int AES = 4;
    }

    public static final class BeeCloud {

        //            BeeCloud.setAppIdAndSecret("956fb30c-0579-4469-aa31-64140d64e61c",
//                    "e32e1f0d-d219-4c76-8585-13f953327123");
//        } else {
//        cn.beecloud.BeeCloud.setSandbox(false);
//        //     正式网Appid和secret
//        cn.beecloud.BeeCloud.setAppIdAndSecret("956fb30c-0579-4469-aa31-64140d64e61c",
//                "17b96e5a-2c3d-4265-9308-ec4b50407f6e");
//        public static final String APP_ID = "956fb30c-0579-4469-aa31-64140d64e61c";
//        public static final String APP_Secret = "17b96e5a-2c3d-4265-9308-ec4b50407f6e";
        public static final String APP_ID = "956fb30c-0579-4469-aa31-64140d64e61c";
        public static final String APP_Secret = "17b96e5a-2c3d-4265-9308-ec4b50407f6e";
        public static final String WECHAT_ID = "wx8f9ffda903463ae8";

    }

    public static String getPayOptional() {
        if (IS_DEBUG) {
            return "test_zhh";
        } else {
            return "zhh";
        }
    }

    /**
     * 客户端类型
     */
    public static final class DevType {
        public static final String ANDROID = "Android";
        public static final String IOS = "IOS";
        public static final String WAP = "WAP";
    }

    public static final String CLIENT_TYPE = "app";


    public static final class SendType {
        public static final String SWITCH_PAGE = "switch_page";
        public static final String LOGIN = "login";
        public static final String REGISTER = "register";
        public static final String LOGOUT = "logout";
        public static final String UPDATE = "update";
        public static final String UPDATE_REPAY = "update_repay";
    }

    public static final class ViewType {
        public static final int ACTIVITY = 0;
        public static final int FRAGMENT = 1;
    }


    /**
     * 当前界面
     */
    public static final class View {
        public static final int HOME_VIEW = 0;
        public static final int REPAY_VIEW = 0;
        public static final int USER_VIEW = 2;
    }

    /**
     * 忘记密码类型
     */
    public static final class ForgetPwdType {
        public static final int DEFAULT = 0;
        public static final int CHECK_PHONE = 1;
    }

    /**
     * 刷新类型
     */
    public static final class PullType {
        public static final int PULL_DEFAULT = 0;  //默认
        public static final int PULL_UP = 1;   //上拉
        public static final int PULL_DOWN = 2;  //下拉
    }

    /**
     * 取现结果类型
     */
    public static final class LoanType {
        public static final int FAIL = 0;
        public static final int SUCCESS = 1;
        public static final int VERIFY = 2;
    }


    /**
     * 权限类型
     */
    public static final class PermissionType {
        public final static int WRITE_EXTERNAL_STORAGE_REQUEST_CODE = 0;
        public final static int READ_PHONE_REQUEST_CODE = 1;
        public final static int CAMERA_REQUEST_CODE = 2;
        public final static int WRITE_CONTACTS_REQUEST_CODE = 3;
        public final static int LOCATION_REQUEST_CODE = 4;
        public final static int READ_CALL_LOG_REQUEST_CODE = 5;
    }

    /**
     * fragment类型
     */
    public static final class FragmentType {
        public final static int CHSI = 1;
        public final static int ID_CARD = 2;
        public final static int ZHI_MA = 3;
        public final static int FACE = 4;
//        public static final int RELATIVE = 5;

        public final static int CONTACT = 5;

        public final static int LIMU = 7;
        public final static int HELP = 11;
        public final static int MESSAGE = 12;
        public final static int CHSI_VERIFY = 20;
        public final static int CHSI_REGISTER = 21;
        public final static int CHSI_PWD = 22;
    }

    /**
     * 协议类型
     */
    public static final class ContractType {
        public final static int ABOUT = 0;
        public final static int REGISTER = 14;
        public final static int CHSI = 15;
        public final static int BOOK = 16;
        public final static int WEITUO = 20;
        public final static int FUWU_HETONG = 13;
    }

    /**
     * 支付类型
     */
    public static final class PayType {
        public final static String YIJIPAY = "yijifu";
        public final static String YIJIPAY_WECHAT = "yijifuweixin";
        public final static String ALIPAY = "alipay";
        public final static String Otherpay = "otherpay";
        public final static String BeeCloud = "beecloud";
    }


    /**
     * 认证类型
     */
    public static final class AutonymTypes {
        public final static String email = "email";  // 邮箱
        public final static String mobile = "mobile"; //运营商
        public final static String credit = "credit";  //央行征信
        public final static String jd = "jd";  //京东
        public final static String taobao = "taobao";  //淘宝
        public final static String housefund = "housefund";  //公积金
        public final static String socialsecurity = "socialsecurity";  //社保
        public final static String education = "education";  //学信网
        public final static String maimai = "maimai";  //脉脉
        public final static String linkedin = "linkedin";  //领英
        public final static String bill = "bill";  //信用卡账单
        public final static String ebank = "ebank";  //网银
        public final static String shixin = "shixin";  //失信被执行人
        public final static String autoinsurance = "autoinsurance";  //车险
        public final static String ctrip = "ctrip";  // 携程
        public final static String diditaxi = "diditaxi";  // 滴滴出行
    }

    /**
     * 认证类型
     */
    public static final class IdentityType {
        public final static String xuexin = "xuexin";  // 学籍认证
        public final static String realname = "realname"; //身份认证
        public final static String yunyin = "mobile";  //通信认证
        public final static String taobao = "taobao";  //淘宝认证
        public final static String face_detect = "face_detect";  //"芝麻认证
        public final static String contacts = "contacts";  //基础认证
        public final static String jd = "jd";  //京东认证
        public final static String email = "email";  //邮箱认证"
        public final static String linkedin = "linkedin";  //领英认证
        public final static String housefund = "housefund";  //公积金认证
        public final static String socialsecurity = "socialsecurity";  //社保认证
        public final static String income = "income";  //收入证明
        public final static String car = "car";  //车产认证
        public final static String work = "work";  //工作证明
        public final static String house = "house";  // 房产认证
        public final static String bankcard = "bankcard";  // 银行卡
        public final static String zmscore = "zmscore";  // 芝麻授权

    }


    public static class KEY {
        public static final String LAT = "lat";
        public static final String LNG = "lng";
        public static final String LOCATION_ADDRESS = "location";
        public static final String SERVICE_PHONE = "service_phone";
        public static final String SERVICE_WEIXIN = "service_weixin";
        public static final String SERVICE_TIME = "service_time";
        public static final String SELECTED_RELATIVE = "selected_relative";
        public static final String REPAY_TYPE = "repay_type";
        public static final String PROCESS_URL = "process_url";
        public static final String PAY_ID = "PAY_ID";
        public static final String PAY_TITLE = "PAY_TITLE";
        public static final String PAY_FIRST_TITLE = "PAY_FIRST_TITLE";
        public static final String PAY_CONTENT = "PAY_CONTENT";
        public static final String PAY_WAY = "PAY_WAY";
        public static final String BORROW_STEP = "BORROW_STEP";
        public static final String PAY_WAY_LIST = "PAY_WAY_LIST";

        //        身份证信息
        public static final String BORROW_ADDRESS = "BORROW_ADDRESS";
        public static final String BACK_IMAGE = "BACK_IMAGE";
        public static final String BIRTHDAY = "BIRTHDAY";
        public static final String FRONT_IMAGE = "FRONT_IMAGE";
        public static final String GENDOR = "GENDOR";
        public static final String IDNO = "idcard_no";
        public static final String ISSU_BY = "ISSU_BY";
        public static final String NATION = "NATION";
        public static final String VALID_START = "VALID_START";
        public static final String VALID_END = "VALID_END";
        public static final String NAME = "NAME";
        //        身份证信息
        public static final String LEVEL = "LEVEL";
        public static final String SELECT_PARENTS = "SELECT_PARENTS";

        public static final String DEAL_BEFORE = "DEAL_BEFORE";

        public static final String SELECT_MONEY = "SELECT_MONEY";

        public static final String LEVEL_POINT = "LEVEL_POINT";

        public static final String SOME_IDENTITY_KEY = "SOME_IDENTITY_KEY";
        public static final String ONE_KEY = "ONE_KEY";
    }
}
